package com.ruoyi.event.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 管控措施业务对象 event_gkcs
 *
 * @author strongme
 * @date 2023-02-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class EventGkcsBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long gkcsId;

    /**
     * 吸毒人员id
     */
    @NotNull(message = "吸毒人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

    /**
     * 时间
     */
    @NotNull(message = "时间不能为空", groups = {AddGroup.class, EditGroup.class})
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date sj;

    /**
     * 类型区分
     */
    @NotBlank(message = "类型区分不能为空", groups = {AddGroup.class, EditGroup.class})
    private String lxqf;

    /**
     * 上传附件
     */
    private String fj;

    /**
     * 措施内容
     */
    @NotBlank(message = "措施内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String csnr;


}
